public static int EnumToInt<TValue>(this TValue value) where TValue : Enum => (int)(object)value;